package com.example.springbootprodb.service.impl;

import com.example.springbootprodb.dao.DeptDao;
import com.example.springbootprodb.enity.Dept;
import com.example.springbootprodb.enity.Result;
import com.example.springbootprodb.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    DeptDao deptDao;

    @Override
    public List<Dept> listService() {
      List<Dept> depts= deptDao.selectDeptDao();
        return depts;
    }

    @Override
    public void delService(Integer id) {
       deptDao.delDeptDao(id);
    }
}
